package com.xjzp.business.db.hibernate.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the tb_user table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="tb_user"
 */

public abstract class BaseTbUser  implements Serializable {

	public static String REF = "TbUser";
	public static String PROP_STATUS = "Status";
	public static String PROP_MOBILE_NO = "MobileNo";
	public static String PROP_LAST_VISIT_TIME = "LastVisitTime";
	public static String PROP_ZIP_CODE = "ZipCode";
	public static String PROP_CONTACT_NAME = "ContactName";
	public static String PROP_TEL = "Tel";
	public static String PROP_MASTER_NAME = "MasterName";
	public static String PROP_PASSWORD = "Password";
	public static String PROP_EMAIL = "Email";
	public static String PROP_UNIT_ID = "UnitId";
	public static String PROP_FAX = "Fax";
	public static String PROP_ADDRESS = "Address";
	public static String PROP_SUB1 = "Sub1";
	public static String PROP_UNIT_NAME = "UnitName";
	public static String PROP_USER_NAME = "UserName";
	public static String PROP_ID = "Id";
	public static String PROP_ROLE_ID = "RoleId";


	// constructors
	public BaseTbUser () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTbUser (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String userName;
	private java.lang.String password;
	private java.lang.Integer unitId;
	private java.lang.String unitName;
	private java.lang.String address;
	private java.lang.String zipCode;
	private java.lang.String contactName;
	private java.lang.String tel;
	private java.lang.String fax;
	private java.lang.String masterName;
	private java.lang.String mobileNo;
	private java.lang.String email;
	private java.lang.Integer roleId;
	private java.lang.String lastVisitTime;
	private java.lang.Integer status;
	private java.lang.Integer sub1;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: user_name
	 */
	public java.lang.String getUserName () {
		return userName;
	}

	/**
	 * Set the value related to the column: user_name
	 * @param userName the user_name value
	 */
	public void setUserName (java.lang.String userName) {
		this.userName = userName;
	}



	/**
	 * Return the value associated with the column: password
	 */
	public java.lang.String getPassword () {
		return password;
	}

	/**
	 * Set the value related to the column: password
	 * @param password the password value
	 */
	public void setPassword (java.lang.String password) {
		this.password = password;
	}



	/**
	 * Return the value associated with the column: unit_id
	 */
	public java.lang.Integer getUnitId () {
		return unitId;
	}

	/**
	 * Set the value related to the column: unit_id
	 * @param unitId the unit_id value
	 */
	public void setUnitId (java.lang.Integer unitId) {
		this.unitId = unitId;
	}



	/**
	 * Return the value associated with the column: unit_name
	 */
	public java.lang.String getUnitName () {
		return unitName;
	}

	/**
	 * Set the value related to the column: unit_name
	 * @param unitName the unit_name value
	 */
	public void setUnitName (java.lang.String unitName) {
		this.unitName = unitName;
	}



	/**
	 * Return the value associated with the column: address
	 */
	public java.lang.String getAddress () {
		return address;
	}

	/**
	 * Set the value related to the column: address
	 * @param address the address value
	 */
	public void setAddress (java.lang.String address) {
		this.address = address;
	}



	/**
	 * Return the value associated with the column: zip_code
	 */
	public java.lang.String getZipCode () {
		return zipCode;
	}

	/**
	 * Set the value related to the column: zip_code
	 * @param zipCode the zip_code value
	 */
	public void setZipCode (java.lang.String zipCode) {
		this.zipCode = zipCode;
	}



	/**
	 * Return the value associated with the column: contact_name
	 */
	public java.lang.String getContactName () {
		return contactName;
	}

	/**
	 * Set the value related to the column: contact_name
	 * @param contactName the contact_name value
	 */
	public void setContactName (java.lang.String contactName) {
		this.contactName = contactName;
	}



	/**
	 * Return the value associated with the column: tel
	 */
	public java.lang.String getTel () {
		return tel;
	}

	/**
	 * Set the value related to the column: tel
	 * @param tel the tel value
	 */
	public void setTel (java.lang.String tel) {
		this.tel = tel;
	}



	/**
	 * Return the value associated with the column: fax
	 */
	public java.lang.String getFax () {
		return fax;
	}

	/**
	 * Set the value related to the column: fax
	 * @param fax the fax value
	 */
	public void setFax (java.lang.String fax) {
		this.fax = fax;
	}



	/**
	 * Return the value associated with the column: master_name
	 */
	public java.lang.String getMasterName () {
		return masterName;
	}

	/**
	 * Set the value related to the column: master_name
	 * @param masterName the master_name value
	 */
	public void setMasterName (java.lang.String masterName) {
		this.masterName = masterName;
	}



	/**
	 * Return the value associated with the column: mobile_no
	 */
	public java.lang.String getMobileNo () {
		return mobileNo;
	}

	/**
	 * Set the value related to the column: mobile_no
	 * @param mobileNo the mobile_no value
	 */
	public void setMobileNo (java.lang.String mobileNo) {
		this.mobileNo = mobileNo;
	}



	/**
	 * Return the value associated with the column: email
	 */
	public java.lang.String getEmail () {
		return email;
	}

	/**
	 * Set the value related to the column: email
	 * @param email the email value
	 */
	public void setEmail (java.lang.String email) {
		this.email = email;
	}



	/**
	 * Return the value associated with the column: role_id
	 */
	public java.lang.Integer getRoleId () {
		return roleId;
	}

	/**
	 * Set the value related to the column: role_id
	 * @param roleId the role_id value
	 */
	public void setRoleId (java.lang.Integer roleId) {
		this.roleId = roleId;
	}



	/**
	 * Return the value associated with the column: last_visit_time
	 */
	public java.lang.String getLastVisitTime () {
		return lastVisitTime;
	}

	/**
	 * Set the value related to the column: last_visit_time
	 * @param lastVisitTime the last_visit_time value
	 */
	public void setLastVisitTime (java.lang.String lastVisitTime) {
		this.lastVisitTime = lastVisitTime;
	}



	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}



	/**
	 * Return the value associated with the column: sub_1
	 */
	public java.lang.Integer getSub1 () {
		return sub1;
	}

	/**
	 * Set the value related to the column: sub_1
	 * @param sub1 the sub_1 value
	 */
	public void setSub1 (java.lang.Integer sub1) {
		this.sub1 = sub1;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.xjzp.business.db.hibernate.po.TbUser)) return false;
		else {
			com.xjzp.business.db.hibernate.po.TbUser tbUser = (com.xjzp.business.db.hibernate.po.TbUser) obj;
			if (null == this.getId() || null == tbUser.getId()) return false;
			else return (this.getId().equals(tbUser.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}